﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class tooltip : MonoBehaviour
{

    private Card card;
    private string data;
    public GameObject tooptp;

    void Start()
    {
        tooptp = GameObject.Find("tooltip");
    }

    public void Activate(Card card)
    {
        this.card = card;
        Constractdatastring();
    }

    public void Deactivate()
    {

    }

    public void Constractdatastring()
    {
        data = "卡名：" + card.Name + "\n等级：" + card.Grade + "\n截击/支援：" + card.Skill + "\n力量：" + card.Pow + "\n护盾：" + card.Sld + 
               "\n国家：" + card.Nation +"\n集团：" + card.Clan + "\n种族：" + card.Race + "\n判定：" + card.Damage + "\n技能：" + card.Des;
        tooptp.transform.GetChild(0).GetComponent<Text>().text = data;
    }
}
